generic
    type element_t is private;
    with function "<" (left, right : element_t) return boolean;
    with function ">" (left, right : element_t) return boolean;
    with function "+" (left, right : element_t) return element_t;
    with function "-" (left, right : element_t) return element_t;
    with procedure print_element (item : in element_t);
package binary_tree is
    type tree_node_t;
    type tree_node is access tree_node_t;
    type tree_node_t is
	    record
		    left, right : tree_node;
		    value : element_t;
	    end record;
    
    procedure print ( node : tree_node );
    procedure printPostOrder ( node : tree_node);
    procedure printPaths ( node : tree_node);
    procedure mirror ( node : in tree_node);
    procedure double ( node :  in out tree_node);
    function insert ( node : tree_node; value : in element_t ) return tree_node;
    function lookup ( node : tree_node; value : in element_t ) return boolean;
    function size ( node : tree_node) return integer;
    function maxDepth ( node : tree_node) return integer;
    function minValue ( node : tree_node) return element_t;
    function maxValue ( node : tree_node) return element_t;
    function hasPathSum ( node : tree_node; sum : element_t; zero : element_t) return boolean;

end binary_tree;
